home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 22 code / Paper Juggling / Shell Files / Shell.h < prev    next >
Encoding:
Text File  |  1995-02-28  |  2.7 KB  |  91 lines  |  [TEXT/MMCC]

  1. //---------------------------------------------------------------------
  2. //---------------------------------------------------------------------
  3. //
  4. //    Horrible Rickety Shell, by Dave Johnson
  5. //
  6. //    © Copyright 1985 - 1995 Anyone Who Wants It,
  7. //    All Rights Energetically Hurled as far away from me as possible.
  8. //    Use at your own (considerable) risk.
  9.  
  10. // Prototypes for routines that app must provide, and some constants
  11. #include    "AppInterface.h"
  12.  
  13. // CodeWarrior defines the topLeft and botRight macros in MacHeaders, THINK doesn't
  14. #ifndef topLeft
  15.     #define topLeft(r)    (((Point *) &(r))[0])
  16.     #define botRight(r)    (((Point *) &(r))[1])
  17. #endif
  18.  
  19. /******************
  20. Various Constants
  21. *******************/
  22.  
  23. // The number of Shell Menus
  24. #define kNumShellMenus        3    // Apple, file, and edit
  25.  
  26. // the About... Alert ID*/    
  27. #define    kAboutAlertID        128
  28.  
  29. // Nifty scroll bar constants
  30. #define kScrollWidth            16
  31. #define kScrollAdjust            (kScrollWidth - 1)
  32. /* kScrollTweak is used to compensate for scrollBars "off by one" thang. They are
  33.     off by one on each end, which makes it 2 */
  34. #define kScrollTweak            2    
  35. #define kLineScrollAmount        8
  36. #define kPageScrollAmount        64
  37.  
  38. #define kMinWindowSize            72    // One inch minimum size
  39.  
  40. // Strings
  41. #define kErrorStringsID            129
  42.     #define kGenericErrorStr    1
  43.     #define kNoMemStr            2
  44.     #define kWimpyMachineStr    3
  45.     #define kNoResStr            4
  46.     #define kNoUndoStr            5
  47.     #define kNoPrinterStr        6
  48.     #define kBadReadStr            7
  49.     #define kBadWriteStr        8
  50.     #define kNoGXStr            9
  51.     
  52. // Window, Dialog, and Alert IDs
  53. #define kWindResourceID            128
  54. #define kErrorAlertID            129
  55. #define kPrintingNowDlogID        132
  56. #define kSaveChangesDlogID        135
  57.  
  58. /******************
  59. Prototypes
  60. *******************/
  61.  
  62. // ShellMain.c
  63. Boolean InitShell(void);
  64.  
  65. // ShellEvents.c
  66. void DoEvent(EventRecord *Event);
  67. void DoActivate(WindowPtr wind, Boolean activate);
  68. void DoMouse(EventRecord *eventptr);
  69. void DoAdjustMenus(void);
  70. void DoContentClick(Point thePt, WindowPtr wind, Boolean doubleClick, EventRecord *eventptr);
  71. void DoGrowWindow(WindowPtr wind, Point where);
  72. void DoZoomWindow(WindowPtr wind, short zoomDir);
  73. void DoKey(EventRecord *eventptr);
  74. void DoOS(EventRecord *eventptr);
  75. void DoHighLevel(EventRecord *eventPtr);
  76. void DoMenus(long mstuff);
  77. void DoApple(short item);
  78. void DoFile(short item);
  79. void DoEdit(short item);
  80. Boolean DoClose(WindowPtr wind);
  81. pascal OSErr OAPPHandler(AppleEvent *theAEvent, AppleEvent *reply, long refcon);
  82. pascal OSErr ODOCHandler(AppleEvent *theAEvent, AppleEvent *reply, long refcon);
  83. pascal OSErr PDOCHandler(AppleEvent *theAEvent, AppleEvent *reply, long refcon);
  84. pascal OSErr QUITHandler(AppleEvent *theAEvent, AppleEvent *reply, long refcon);
  85. OSErr    MyGotRequiredParams (AppleEvent *theAEvent);
  86. void BailOut(void);
  87.  
  88.  
  89.  
  90. // ShellUtils.c prototypes are in AppInterface.h
  91.